<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title>Insert title here</title>
	</head>
	<body>
		<div id="role_list">
			<h1 id="page_title">
				帐户列表
			</h1>
			<div id="accounts">
				<table>
					<tr>
						<td>
							帐号
						</td>
						<td>
							类型
						</td>
						<td>
							描述
						</td>
						<td>
							开户人
						</td>
						<td>
							开户时间
						</td>
						<td>
							开户金额
						</td>
						<td>
						     现余额
						</td>
					</tr>
					<c:forEach var="account"
						items="${pagination.results}">
						<tr></tr>
						<tr>
							<td>
								${account.id }
							</td>
							<td>
								${account.type }
							</td>
							<td>
								${account.description }
							</td>
							<td>
								${account.customer.fullName.lastName }${account.customer.fullName.firstName }
							</td>
							<td>
								${account.begin_balance_time }
							</td>
							<td>
								${account.begin_balance }
							</td>
							<td>${account.balance }</td>
						</tr>
					</c:forEach>
				</table>
			</div>

			<div class="pagination">
				<ul>
					<li>
						${pagination.size }条/页
					</li>
					<li>
						${pagination.pageSum }页
					</li>
					<li>
						${pagination.recordSum }条
					</li>
					<c:if test="${!pagination.first}">
						<li>
							<a
								href="findCustomer.action?pagination.no=1&filtername=${filtername }&c_value=${c_value }">首页</a>
						</li>
					</c:if>
					<c:if test="${pagination.previous}">
						<li>
							<a
								href="findCustomer.action?pagination.no=${pagination.no-1 }&filtername=${filtername }&c_value=${c_value }">上页</a>
						</li>
					</c:if>
					<c:if test="${pagination.next}">
						<li>
							<a
								href="findCustomer.action?pagination.no=${pagination.no+1 }&filtername=${filtername }&c_value=${c_value }">下页</a>
						</li>
					</c:if>
					<c:if test="${!pagination.last&&pagination.no>0}">
						<li>
							<a
								href="findCustomer.action?pagination.no=${pagination.pageSum }&filtername=${filtername }&c_value=${c_value }">末页</a>
						</li>
					</c:if>
				</ul>
			</div>
		</div>
	</body>
</html>